<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>07_数据双向绑定</title>
</head>
<body>
    <div id="test">
      <input type="text" v-model="msg"/>
      <input type="text" :value="msg" @input="msg = $event.target.value"/>
      <p>{{msg}}</p>
    </div>
  
    <script src="./js/mvvm/compile.js"></script>
    <script src="./js/mvvm/mvvm.js"></script>
    <script src="./js/mvvm/observer.js"></script>
    <script src="./js/mvvm/watcher.js"></script>
    <script>
      const vm = new MVVM({
        el: '#test',
        data: {
          msg: 'abc'
        }
      })

      setTimeout(() => {
        vm.msg = 'cba'
      }, 1000);
    </script>
</body>
</html>
